package cn.wizzer.app.onlyoffice.modules.services;

import cn.wizzer.app.onlyoffice.modules.services.impl.CallbackHandler;
import com.alibaba.fastjson2.annotation.JSONAutowired;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;

/**
 * 处理文档服务器返回的数据
 */

public interface Callback {
    int handle(cn.wizzer.app.onlyoffice.modules.dto.Callback body, String fileId);
    int getStatus();

    default void selfRegistration(CallbackHandler callbackHandler) {
        callbackHandler.register(getStatus(), this);
    }
}
